package com.heu.blood.statistic.controller;

import com.heu.blood.common.aop.ControllerLogAnnotation;
import com.heu.blood.common.utils.PageUtils;
import com.heu.blood.common.utils.R;
import com.heu.blood.statistic.entity.BloodStorageData;
import com.heu.blood.statistic.service.BloodInventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author bearH
 * @date 2023-09-09 10:48
 */
@RestController
@RequestMapping("statistic/bloodinventory")
public class BloodInventoryController {
    @Autowired
    private BloodInventoryService bloodInventoryService;

    @RequestMapping("/list")
    @ControllerLogAnnotation(module = "库存统计", operate = "查询库存统计信息")
    public R list(){
        BloodStorageData bloodStorageData = bloodInventoryService.queryStorage();
        return R.ok().put("data", bloodStorageData);
    }

}
